1. Field of the Invention
The present invention relates generally to the field of microcontrollers and more particularly to microcontroller on chip oscillators.
2. Description of Background Art
Advances in technology have led to an increase in performance and a decrease in size of semiconductor microcontroller or microprocessor chips. Microcontrollers are devices that can control the operation of many items, e.g., braking systems in automobiles, automatic water sprinklers, and cellular telephones. Microcontrollers generally receive power from a supply voltage that is external to the microcontroller. This supply voltage can vary during brown out conditions, for example. In addition, as indicated above microcontrollers are used in a variety of situations and in a variety of environments. Some microcontrollers are used in locations that experience a wide temperature variance. For example, in an automobile engine a microcontroller may be exposed to temperatures that exceed 140 degrees Centigrade and to temperatures that are below negative 30 degrees Centigrade. The frequency of clock pulses generated by conventional oscillator systems is affected by the operating temperature. For example, the transistor-level components of conventional oscillators are temperature dependent which result in oscillator frequency variations.
Such frequency variations are undesirable. In many situations the consistency of the oscillator frequency is important for proper operation of a device. Accordingly, an oscillator that is substantially independent of the operating temperature and of variations of the supply voltage level is necessary for proper operation of many devices.
One conventional oscillation system that attempts to solve some of the above identified problems is described in U.S. Pat. No. 5,565,819 to Cooper which is incorporated by reference herein in its entirety. In Cooper, voltage variations are addressed by requiring multiple comparators, at least one for an upper predefined voltage limit and one for a lower predefined voltage limit. Each comparator compares an oscillatory signal to a modified voltage signal that is slightly below (or above) a threshold voltage for that the oscillatory signal. The design purports to switch each comparator when the oscillatory signal reaches this modified voltage signal in order to account for a delay in the flip-flop transition. Cooper describes a system that purports to oscillate between two voltage levels where these voltage levels are purported to have negligible temperature or power supply variations effects. That is, the voltage level of the oscillator signal is purported to nearly independent of negligible temperature or power supply variations.
However, Cooper does not address the problem of oscillator frequency variations based upon temperature and supply voltage variations. For example, the values of resistors are dependent upon the temperature. When resistors are used in an RC oscillator circuit the resistor values vary as a function of temperature causing the oscillator frequency to vary.
In addition, the Cooper design uses multiple comparators and multiple voltage sampling which is costly in terms of the additional logic necessary to implement. This size problem is compounded if the oscillator is to be located on a microcontroller itself, i.e., it is an on-chip oscillator.
What is needed is a system and method for (1) ensuring a substantially constant oscillator frequency that is substantially independent of the operating temperature; (2) ensuring a substantially constant oscillator frequency that is substantially independent of variations of the supply voltage level; (3) where the oscillator is an on-chip oscillator; (4) without requiring significantly additional logic, e.g., not requiring the use of multiple comparators; and (5) enabling post packaging modifications of the oscillator frequency.